import core
import os
import package

def test() -> None:
    #package.download_package_from_repository(r"C:/Program Files/Git/bin/git.exe","https://gitee.com/TunaFish2C/app_ins_card_distribution/","./test/packages/app_ins_card_distribution/")
    package.create_environment("./test/environments/app_ins_card_distribution/","./test/packages/app_ins_card_distribution/","C:/Program Files/Python36/python.exe", "https://pypi.tuna.tsinghua.edu.cn/simple")
    
    return

    task = package.run_package("./test/environments/app_ins_card_distribution/","./test/packages/app_ins_card_distribution/")
    task.stdin.writelines([
        b"C:/Users/86166/Desktop/projects/ins_card/output/\n",
        b"C:/Users/86166/Desktop/projects/ins_card/output/\n",
        (str(1)+"\n").encode(),
        b"C:/Users/86166/Desktop/projects/ins_card/decks/more_squirrels.json;6|cm;8.6|cm\n"
    ])
    stdout, _ = task.communicate()
    print(stdout.decode().rstrip(" \r\n"))

if __name__ == "__main__":
    try:
        test()
    except KeyboardInterrupt:
        pass